package Week5;

public class Rectangle implements Geometry {
	//A rectangle is defined with two side lengths.

	double side1, side2;
	int numberOfEdges;
	
	
	public Rectangle(double side1, double side2) {
		this.side1 = side1;
		this.side2 = side2;
		
	}
	//the case of the square.  This should only be available to the subclass so it's protected.
	protected Rectangle(double side1) {
		this.side1 = side1;
		//in the case of square side2 = side1
		this.side2 = side1;
		}

	public double computeArea() {
		return side1*side2;
	}

	public double computeLength() {
		return 2*side1+2*side2;
	}

	public int computeDimension() {
		return 2;
	}
	
}
